A property can be more convenient than a method. More importantly,
we are about to allow the icon to change, so a property will be
useful to get notified about those changes.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1761>
PROP_ID,
PROP_DBUS_ID,
PROP_ACTION_GROUP,
+ PROP_ICON,
PROP_APP_INFO
};
case PROP_ID:
g_value_set_string (value, shell_app_get_id (app));
break;
+ case PROP_ICON:
+ g_value_set_object (value, shell_app_get_icon (app));
+ break;
case PROP_ACTION_GROUP:
if (app->running_state)
g_value_set_object (value, app->running_state->muxer);
NULL,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+ /**
+ * ShellApp:icon:
+ *
+ * The #GIcon representing this ShellApp
+ */
+ g_object_class_install_property (gobject_class,
+ PROP_ICON,
+ g_param_spec_object ("icon",
+ "GIcon",
+ "The GIcon representing this app",
+ G_TYPE_ICON,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
/**
* ShellApp:action-group:
*